package com.simple.core.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

/**
 * 设置操作人
 *
 * @author FanXing
 * @date 2023年03月07日 16:36
 */
@EnableJpaAuditing
@Configuration
public class AuditorConfig {

    @Bean
    @ConditionalOnMissingBean
    AuditorAwareImpl auditorAware() {
        return new AuditorAwareImpl();
    }
}
